const {EchoRequest, EchoResponse} = require('./echo_pb.js');
const {EchoServiceClient} = require('./echo_grpc_web_pb.js');

var echoService = new EchoServiceClient('http://grpctest');

var request = new EchoRequest();
request.setMessage('Hello World!');

echoService.echo(request, {}, function (err, response) {
    console.log(response);
    console.log(err);
});